<!--
 * @Descripttion : 
 * @Autor        : Lilong
 * @Date         : 2022-09-07 16:03:05
 * @LastEditTime : 2022-09-07 16:11:03
 * @FilePath     : \src\components\todo-list.vue
-->
<template>
    <div>我是todo-list组件</div>
    <div>
        <div>{{ todos.length }}</div>
        <!-- 模板的其余部分 -->
        <todo-item></todo-item>
    </div>
</template>

<script>
import {  defineComponent, provide, reactive } from "vue";
import TodoItem from './todo-item.vue'

export default defineComponent({
    name: 'TodoList',
    components: {
        TodoItem
    },
    provide: {
        user: 'John Doe',
    },
    setup() {
        const todos = reactive(['Feed a cat', 'Buy tickets'])

        return {
            todos
        }
    }
})
</script>